import Vue from 'vue'
import Router from 'vue-router'

import WorldIndex from '@/components/world-index'
import IndexBookshelf from '@/page/index-bookshelf'
import IndexStore from '@/page/index-store'
import IndexVip from '@/page/index-vip'
import IndexPerson from '@/page/index-person'

import WorldReader from '@/components/world-reader'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Default',
      redirect: IndexStore
    },
    {
      path: '/index',
      name: 'WorldIndex',
      component: WorldIndex,
      children: [
        {
          path: 'bookshelf',
          name: 'IndexBookshelf',
          component: IndexBookshelf
        },
        {
          path: 'store',
          name: 'IndexStore',
          component: IndexStore
        },
        {
          path: 'vip',
          name: 'IndexVip',
          component: IndexVip
        },
        {
          path: 'person',
          name: 'IndexPerson',
          component: IndexPerson
        }
      ]
    },
    {
      path: '/read',
      name: 'WorldRead',
      component: WorldReader
    }
  ]
})
